package br.perfiman.dao;

import java.util.List;

import javax.ejb.Local;

import br.perfiman.model.Asset;
import br.perfiman.model.Portfolio;
import br.perfiman.model.Trade;

/**
 *
 * @author Wagner Costa
 * @since 08/03/2008
 * @version 1.0
 *
 */
@Local
public interface PortfolioDAOService extends AbstractDAOService<Portfolio>{

	/**
	 * Get a portfolio who is using the asset
	 *
	 * @author Wagner Costa
	 * @since 08/03/2008
	 * @version 1.0
	 * @param asset
	 * @return
	 * @throws Exception
	 */
	Portfolio retrieveByAsset(Asset asset) throws Exception;

	/**
	 * Removes all the portfolios
	 *
	 * @author Wagner Costa
	 * @since 25/03/2008
	 * @version 1.0
	 * @throws Exception
	 */
	void removeAll() throws Exception;

	/**
	 * Retrieve the trades good to be used in Portfolio
	 *
	 * @author Wagner Costa
	 * @since 25/03/2008
	 * @version 1.0
	 * @throws Exception
	 */
	List<Trade> getTrades();
}
